<template>
  <div class="layout_page_wrapper reserves_page_warpper">
    <div class="reserves_lf_panel">
      <div class="panel_header"></div>
      <CataLogTree />
    </div>
    <div class="reserves_page_content" v-if="showWin">
      <div class="site_box"></div>
      <ChartWin />
    </div>
  </div>
</template>

<script setup>
import CataLogTree from './components/CatalogTree/index.vue';
import ChartWin from './components/ChartWin/index.vue';
//窗口显隐开关
const showWin = ref(false);

//当前选中的节点层级
const activeLevel = ref(0);

//事件树面板叶子节点回调
function leafNodeChange(id) {
  if (showWin.value) return;
  else {
    showWin.value = true;
  }
  console.log(id);
}

//注入组件内透传相应变量
provide('reserves', {
  showWin,
  activeLevel,
  leafNodeChange
});
</script>
